import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'get',
    params: data
  })
}

export function getInfo() {
  return request({
    url: '/user',
    method: 'get'
  })
}

// export function logout() {
//   return request({
//     url: '/user/logout',
//     method: 'post'
//   })
// }

export function getNewAccesstoken(refresh_token) {
  return request({
    url: '/refresh-token',
    method: 'get',
    params: { refresh_token }
  })
}
